package dht.entity;

public enum MessageType {

	/**
	 * Message flows
	 * 
	 * 1.Client read: READ_REQ->(READ_FWD->READ_REQ->)READ_RESP
	 * 
	 * 2.Client write: WRITE_REQ->(WRITE_FWD->WRITE_REQ->)WRITE_RESP
	 * 
	 * 3.Client table request: CLIENT_TABLE_REQ->CLIENT_TABLE_RESP
	 * 
	 * 4.Server join: JOIN_REQ->JOIN_RESP->JOIN_ACK
	 * 
	 * 5.Server table request: SERVER_TABLE_REQ->SERVER_TABLE_RESP
	 * 
	 * 6.Master move request:
	 * MOV_REQ->DATA_MOV_REQ->DATA_MOV_RESP->MOV_RESP->DATA_RELEASE_REQ
	 * ->DATA_RELEASE_RESP->TABLE_PUSH_REQ->TABLE_PUSH_RESP
	 */

	// from client to server
	READ_REQ, WRITE_REQ,
	// from client to master
	CLIENT_TABLE_REQ,

	// from server to client
	READ_FWD, READ_RESP, WRITE_FWD, WRITE_RESP,
	// from server to master
	JOIN_REQ, JOIN_ACK, MOV_RESP, DATA_RELEASE_RESP, SERVER_TABLE_REQ, TABLE_PUSH_RESP,
	// from server to server
	DATA_MOV_REQ, DATA_MOV_RESP,

	// from master to client
	CLIENT_TABLE_RESP,
	// from master to server
	JOIN_RESP, MOV_REQ, DATA_RELEASE_REQ, SERVER_TABLE_RESP, TABLE_PUSH_REQ,
}
